package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TransferStockInMapper;
import com.ruoyi.system.domain.TransferStockIn;
import com.ruoyi.system.service.ITransferStockInService;

/**
 * 调拨入库 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-06-01
 */
@Service
public class TransferStockInServiceImpl implements ITransferStockInService
{
    @Autowired
    private TransferStockInMapper transferStockInMapper;

    /**
     * 通过id查询调拨入库
     *
     * @param id 调拨入库主键
     * @return 调拨入库
     */
    @Override
    public TransferStockIn selectTransferStockInById(Long id)
    {
        return transferStockInMapper.selectTransferStockInById(id);
    }

    /**
     * 通过调入仓库名称和调出仓库名称查询调拨入库列表
     *
     * @param inWarehouseName,outWarehouseName 调入仓库名称，调出仓库名称
     * @return 调拨入库
     */
    @Override
    public List<TransferStockIn> selectTransferStockInListByName(String inWarehouseName,String outWarehouseName)
    {
        return transferStockInMapper.selectTransferStockInListByName(inWarehouseName,outWarehouseName);
    }

    /**
     * 新增调拨入库
     *
     * @param transferStockIn 调拨入库
     * @return 结果
     */
    @Override
    public int insertTransferStockIn(TransferStockIn transferStockIn)
    {
        return transferStockInMapper.insertTransferStockIn(transferStockIn);
    }

    /**
     * 修改调拨入库
     *
     * @param transferStockIn 调拨入库
     * @return 结果
     */
    @Override
    public int updateTransferStockIn(TransferStockIn transferStockIn)
    {
        return transferStockInMapper.updateTransferStockIn(transferStockIn);
    }

    /**
     * 通过id批量删除调拨入库信息
     *
     * @param ids 需要删除的调拨入库主键
     * @return 结果
     */
    @Override
    public int deleteTransferStockInByIds(Long[] ids)
    {
        return transferStockInMapper.deleteTransferStockInByIds(ids);
    }

    /**
     * 通过id删除调拨入库信息
     *
     * @param id 调拨入库主键
     * @return 结果
     */
    @Override
    public int deleteTransferStockInById(Long id)
    {
        return transferStockInMapper.deleteTransferStockInById(id);
    }
}
